<html>
<head><meta charset="utf-8"><title>LLVM error when building the compiler · general · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/index.html">general</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/LLVM.20error.20when.20building.20the.20compiler.html">LLVM error when building the compiler</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="180260643"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/LLVM%20error%20when%20building%20the%20compiler/near/180260643" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Bhargav Voleti <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/LLVM.20error.20when.20building.20the.20compiler.html#180260643">(Nov 08 2019 at 19:04)</a>:</h4>
<p>Hi, I'm using x.py to build the compiler but it's failing on<code>int_endianness.h</code> with the error message "Unable to determine endian". This error shows up on a freshly cloned repo and a fresh build. I'm running this on a RHEL 5.3 machine and this is the command I used to start the build: <code>./x.py build</code></p>



<a name="180473999"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/LLVM%20error%20when%20building%20the%20compiler/near/180473999" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Goulding <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/LLVM.20error.20when.20building.20the.20compiler.html#180473999">(Nov 12 2019 at 01:25)</a>:</h4>
<blockquote>
<p>5.3, also termed Update 3, January 20, 2009; 10 years ago (kernel 2.6.18-128)</p>
</blockquote>
<p>That's... pretty old.</p>



<a name="180499410"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/LLVM%20error%20when%20building%20the%20compiler/near/180499410" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Laurențiu <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/LLVM.20error.20when.20building.20the.20compiler.html#180499410">(Nov 12 2019 at 10:00)</a>:</h4>
<p>See also <a href="https://github.com/rust-lang/rust/issues/62516" target="_blank" title="https://github.com/rust-lang/rust/issues/62516">https://github.com/rust-lang/rust/issues/62516</a>. <span class="user-mention" data-user-id="138448">@cuviper</span> would know more, perhaps?</p>



<a name="180535886"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/LLVM%20error%20when%20building%20the%20compiler/near/180535886" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> cuviper <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/LLVM.20error.20when.20building.20the.20compiler.html#180535886">(Nov 12 2019 at 16:44)</a>:</h4>
<p><span class="user-mention" data-user-id="248777">@Bhargav Voleti</span> what C compiler are you using? RHEL5's gcc is too old for LLVM. you may see rust/src/ci/docker/dist-x86_64-linux to see what we do to get sufficient toolchains on that centos:5 image</p>



<a name="180853510"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/LLVM%20error%20when%20building%20the%20compiler/near/180853510" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Bhargav Voleti <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/LLVM.20error.20when.20building.20the.20compiler.html#180853510">(Nov 15 2019 at 17:30)</a>:</h4>
<p>Yeah I think it's related to that <span class="user-mention" data-user-id="197894">@Philipp Hansch</span> pointed out that it could be a compiler version issue. And I think it's GCC 4.4.6 Trying to update the version of GCC sort of borked the install. I'm just going to use my laptop running osx to build rustc.</p>



<a name="180866968"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/LLVM%20error%20when%20building%20the%20compiler/near/180866968" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Bhargav Voleti <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/LLVM.20error.20when.20building.20the.20compiler.html#180866968">(Nov 15 2019 at 20:06)</a>:</h4>
<p>Got the build working. I had to build the latest GCC from scratch and override the default <code>cc</code> symlink, but it works!</p>



<a name="180878814"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/LLVM%20error%20when%20building%20the%20compiler/near/180878814" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Bhargav Voleti <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/LLVM.20error.20when.20building.20the.20compiler.html#180878814">(Nov 15 2019 at 22:32)</a>:</h4>
<p>I celebrated prematurely. Looks like building LLVM requires an ancient version of GLIBCXX</p>



<a name="180909220"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/LLVM%20error%20when%20building%20the%20compiler/near/180909220" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Laurențiu <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/LLVM.20error.20when.20building.20the.20compiler.html#180909220">(Nov 16 2019 at 11:50)</a>:</h4>
<p>Docker might also work if you don't need binaries for CentOS or RHEL 5 (since you mentioned using the Mac)</p>



<a name="180922603"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/LLVM%20error%20when%20building%20the%20compiler/near/180922603" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> cuviper <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/LLVM.20error.20when.20building.20the.20compiler.html#180922603">(Nov 16 2019 at 18:18)</a>:</h4>
<p>If you just need a working toolchain, the official binaries should be compatible with RHEL 5.</p>



<a name="180922618"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/LLVM%20error%20when%20building%20the%20compiler/near/180922618" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> cuviper <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/LLVM.20error.20when.20building.20the.20compiler.html#180922618">(Nov 16 2019 at 18:19)</a>:</h4>
<p>If you're trying to modify the compiler, then I would choose a newer platform for development</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>